package casbinRouter

import (
	"github.com/Sir-yuChen/funAnalyse/api"
	"github.com/Sir-yuChen/funAnalyse/global"
	"github.com/Sir-yuChen/funAnalyse/middleware"
	"github.com/gin-gonic/gin"
)

type StockDeptRouter struct{}

func (co *StockDeptRouter) StockDeptApiRouter(Router *gin.RouterGroup) {
	commonJwtRouter := Router.Group("casbin").Use(middleware.JWTAuth()).Use(middleware.CasbinMiddleware())
	api := api.ApiGroupApp.CasbinApiGroup.StockDeptController
	{
		commonJwtRouter.GET(global.API_CASBIN_Dept_GET.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_Dept_GET), api.GetStockDept)
		commonJwtRouter.POST(global.API_CASBIN_Dept_INSERT.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_Dept_INSERT), api.InsertStockDept)
		commonJwtRouter.POST(global.API_CASBIN_Dept_UPDATE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_Dept_UPDATE), api.UpdateStockDept)
		commonJwtRouter.GET(global.API_CASBIN_Dept_DEL.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_Dept_DEL), api.DelStockDept)
	}
}
